<!DOCTYPE html>
<html>
<head>
	<title>onXLS / onXLE</title>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<link rel="stylesheet" type="text/css" href="../../../codebase/dhtmlx.css"/>
	<script src="../../../codebase/dhtmlx.js"></script>
	<style>
		div#logs_here {
			font-family: Tahoma;
			font-size: 11px;
			height: 150px;
			border: 1px solid #cecece;
			overflow: auto;
			margin-top: 20px;
		}
	</style>
	<script>
		var myRibbon, i=0;
		function doOnLoad() {
			myRibbon = new dhtmlXRibbon({
				parent: "ribbonObj",
				icons_path:"../common/"
			});
			
			myRibbon.attachEvent("onXLS",function() {
				setNoteToLog({
					eventNme: "onXLS",
					arg: []
				});
			});
			
			myRibbon.attachEvent("onXLE",function() {
				setNoteToLog({
					eventNme: "onXLE",
					arg: []
				});
			});
			
			myRibbon.loadStruct("../common/sample_1.json",function() {
				setNoteToLog({
					eventNme: "load handler",
					arg: []
				});
			});
		};
		
		function doOnUnload() {
			if (myRibbon) {
				myRibbon.unload();
				myRibbon = null;
			}
		};

		function setNoteToLog(data) {
			var cont = document.getElementById("logs_here");
			cont.innerHTML = "<div>"+ (++i)+") "+data.eventNme+" -- arguments: ["+data.arg.join(", ")+"]"+"</div>"+cont.innerHTML;
		};
	</script>
</head>
<body onload="doOnLoad();" onunload="doOnUnload();">
	<div id="ribbonObj"></div>
	<div id="logs_here"></div>
</body>
</html>
